-- GENERATED SPELL FOR [Ethereal Nethermancer] --


function spell0_21370(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17173,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_21370', 5000, 1)
end

function spell1_21370(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21370', 3000, 1)
end

function Sorts_21370(pUnit, Event)
local choix_sorts_21370 = math.random(0, 1)
if choix_sorts_21370 == 0 then
pUnit:RegisterEvent('spell0_21370', 1, 1)
end
if choix_sorts_21370 == 1 then
pUnit:RegisterEvent('spell1_21370', 1, 1)
end
end

function mob21370_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21370', math.random(1500, 3000), 1)
end

function mob21370_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21370_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21370_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21370, 1, 'mob21370_Action')
RegisterUnitEvent(21370, 2, 'mob21370_Leave')
RegisterUnitEvent(21370, 3, 'mob21370_Kill')
RegisterUnitEvent(21370, 4, 'mob21370_Die')
